#pragma once

#include "MsgRouter.h"
#include "accountmgr.h"
#include "agencyevent.h"

class ActionEventCb
{
public:
    static bool Init();
    
public:
    static void HandleInviteCb(HttpData&& data);
    static void OnInviteCbAccountGet(std::int32_t err_code, stAccount* account, std::string&& trans);
    static int RequestInviteCb(std::uint32_t uid, std::uint32_t parent_uid, const std::int32_t& share_type, 
    const std::string& share_code, std::uint32_t agency_id, const std::string& username, std::uint64_t request_time, const std::string& parent_username, const std::int32_t& child_type);

    static void HandleValidInviteCb(HttpData&& data);
    static void OnValidInviteCbAccountGet(std::int32_t err_code, stAccount* account, std::string&& trans);
    static int RequestValidInviteCb(std::uint32_t uid, std::uint32_t parent_uid, const std::int32_t& share_type, 
    const std::string& share_code, std::uint32_t agency_id, const std::string& username, std::uint64_t request_time, const std::string& parent_username);

    static void HandleRechargeCb(HttpData&& data);
    static void OnRechargeCbAccountGet(std::int32_t err_code, stAccount* account, std::string&& trans);
    static void OnRechargeCbAgencyEventGet(std::int32_t err_code, stAgencyEvent* agency, std::string&& trans);
    static int RequestRechargeCb(std::uint32_t uid, std::int64_t amount, const std::string& currency, const std::string& trans, std::uint64_t request_time, std::int64_t extra,
                std::uint32_t agency_id, const std::string& username, bool isfirst, std::int64_t balance);

    static void HandleRegisterCb(HttpData&& data);
    static void OnRegisterCbAgencyEventGet(std::int32_t err_code, stAgencyEvent* agency, std::string&& trans);
    static int RequestRegisterCb(const std::string& user_name, const std::int32_t& agency_id, const std::int32_t& game_id, const std::int32_t& share_type);
    

public:
    static void Response(std::uint32_t request_id, std::uint64_t request_time, int err_code=0, const std::string& msg="");
};















